﻿@model LojaVirtual.Comuns.Clientes.Compra

@{
    ViewBag.Title = "Delete";
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this?</h3>
<fieldset>
    <legend>Compra</legend>
    
    <div class="display-label">
        DataEfetuada</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.DataEfetuada)
    </div>
    <div class="display-label">
        Cliente</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Cliente.Nome)
    </div>
    <fieldset>
        <legend>Itens</legend>
        <table>
            <tr>
                <th>Nome</th>
                <th>Quantidade</th>
                <th>Preço</th>
            </tr>
            @foreach (var item in Model.Itens)
            {
                <tr>
                    <td>@item.Produto.Nome</td>
                    <td>@item.Quantidade</td>
                    <td>@item.Produto.Preco</td>
                </tr>
            }
            <tr>
		<td colspan="3">
			Total: @Model.Total
		</td>
	</tr>	
        </table>
    </fieldset>
</fieldset>
@using (Html.BeginForm()) {
    <p>
        <input type="submit" value="Delete" /> |
        @Html.ActionLink("Back to List", "Index")
    </p>
}
